<template>
    <div>
        <el-row :gutter="20">
            <div align="center" style="font-size: 25px">
                面朝大海，春暖花开
            </div>
            <br>
            <el-col :span="6" v-for="Item in src">
                <div class="grid-content bg-purple">
                    <div class="block"  >
                        <el-image :src="Item"></el-image>
                    </div>
                </div>
            </el-col>
        </el-row>
        <br>
        <div align="center">
            当前位置:{{location}}
        </div>
    </div>
</template>

<script>

    export default {
        name: "Welcome",
        data() {
            return {
                src:[
                    require('../assets/images/国旗.jpg'),
                    require('../assets/images/美丽的风景.jpg'),
                    require('../assets/images/油菜花.jpg'),
                    require('../assets/images/花2.jpg'),
                ],
                location:'',
            }
        },
        created() {
            this.location = sessionStorage.getItem("city");
        },
        // methods:{
        //     getMyAddressInfo(){
        //         getAddress().then((res,) => {
        //             this.location = res.data.content.address
        //             sessionStorage.setItem("city",res.data.content.address);
        //         }).catch(() =>{
        //
        //         })
        //     }
        // }
    }
</script>

<style scoped>

</style>